package com.nymph.constant;

/**
 * @Description: This is a sample class.
 * @Author: Simon
 */
public interface Constant {

    String CHARSET_UTF8="UTF-8";

    //properties文件中的配置信息
    String MAPPER_LOCATION="mapper.location";

    String DB_DRIVER_CONF="db.driver";

    String DB_URL_CONF="db.url";

    String DB_USERNAME_CONF="db.username";

    String DB_PASSWORD="db.password";


    //mapper.xml中的配置
    String MAPPER_FILE_SUFFIX=".xml";

    String XML_ROOT_LABEL="mapper";

    String XML_ELEMENT_ID="id";

    String XML_SELECT_NAMESPACE="namespace";

    String XML_SELECT_RESULTTYPE="resultType";


    //sql 类型 select ? insert ? update?
    public enum SqlType{
        SELECT("select"),
        INSERT("insert"),
        UPDATE("update"),
        DEFAULT("default");

        private String value;

        private SqlType(String value){
            this.value=value;
        }
        public String value(){
            return this.value;
        }
    }
}
